package com.sprucetec.live.enums;

/**
 * @ClassName LiveSettingEnum
 * @Description:
 * @Author Kenny
 * @Date 2020/4/23
 **/
public enum LiveSettingEnum {

    /**
     * 创建直播
     */
    CAROUSEL(1, "轮播"),
    NOT_CAROUSEL(0, "不是轮播"),
    UP_SHELVES(1, "上架"),
    DOWN_SHELVES(0, "下架"),
    NOT_DELETE(0, "未删除"),
    DELETE(1, "删除");

    private Integer code;
    private String desc;

    LiveSettingEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String code2Desc(Integer code) {
        for (LiveOperationTypeEnum status : LiveOperationTypeEnum.values()) {
            if (status.getCode().equals(code)) {
                return status.getDesc();
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
